package com.tyf.bookreader.service;

import com.tyf.bookreader.dto.*;
import com.tyf.bookreader.component.Result;

import java.security.NoSuchAlgorithmException;
import java.util.List;

/**
 * @Description 小说模块，业务层
 * @Author shallow
 * @Date 2023/4/2 9:51
 */

public interface BookService {
    Result<List<BookCategoryDto>> listCategory();

    Result<BookInfoDto> getBookById(Long bookId);

    Result addVisitCount(Long bookId);

    Result<LastChapterInfoDto> getLastChapterAbout(Long bookId);

    Result<List<BookInfoDto>> listRecBooks(Long bookId) throws NoSuchAlgorithmException;

    Result<List<ChapterDto>> listChapters(Long bookId);

    Result<ContentDto> getContentByChapterId(Long chapterId);

    Result<Long> getPreChapterId(Long chapterId);

    Result<Long> getNextChapterId(Long chapterId);

    Result<List<BookDto>> getHotBook();

    Result<ContentDto> getContent(String bookId, String chapterId);

    boolean checkBookPurchase(String bookId);
}
